<html><head>

<title>getPropertyValue should be case insensitive</title>
<script>
        function log(msg)
        {
            var console = document.getElementById('console');
            console.appendChild(document.createTextNode(msg + "\n"));
        }

        function test()
        {
            var test;
            var lowerValue, upperValue;

            if (window.layoutTestController)
                layoutTestController.dumpAsText();

            test = document.getElementById('test');
            lowerValue = document.defaultView.getComputedStyle(test, "").getPropertyValue("width");
            upperValue = document.defaultView.getComputedStyle(test, "").getPropertyValue("WIDTH");
            log("getPropertyValue: " + (lowerValue === upperValue ? "PASS" : "FAIL"));
            
            test.style.setProperty("color", "#ff0000", null);
            test.style.setProperty("COLOR", "#00cc00", null);
            lowerValue = document.defaultView.getComputedStyle(test, "").getPropertyValue("color");
            log("setProperty: " + (lowerValue == "rgb(0, 204, 0)" ? "PASS" : "FAIL"));
            
            test.style.setProperty("font-weight", "bold", null);
            test.style.removeProperty("FONT-WEIGHT");
            lowerValue = document.defaultView.getComputedStyle(test, "").getPropertyValue("font-weight");
            log("removeProperty: " + (lowerValue == "normal" ? "PASS" : "FAIL"));
        }
    </script>
</head><body onload="test();">
<p>Property names retrieved by getPropertyValue, setProperty, removeProperty and others must be treated as case insensitive. This test ensures that they are.</p>
<p>References</p>
<ul>
<li><a href="http://bugs.webkit.org/show_bug.cgi?id=14645">http://bugs.webkit.org/show_bug.cgi?id=14645</a></li>
<li><a href="http://www.w3.org/TR/CSS1#forward-compatible-parsing">http://www.w3.org/TR/CSS1#forward-compatible-parsing</a></li>

</ul>
<p style="color: rgb(0, 204, 0);" id="test">This paragraph should be green, and not bold when the test completes.</p>
<pre id="console">getPropertyValue: PASS
setProperty: PASS
removeProperty: FAIL
</pre>
</body></html>
